# -*- coding: utf-8 -*-
# @Time    : 2022/8/6 17:01
# @Author  : Weijian Yi
# @File    : urls.py
# @Software: PyCharm
from django.contrib import admin
from django.urls import path, include
from .views import *
from django.views.decorators.csrf import ensure_csrf_cookie

urlpatterns = [
    path('login/', LoginView.as_view()),
    path('logout/', Logout.as_view()),
    path('isLogin/', ensure_csrf_cookie(is_login.as_view())),
    path('user/', UserList.as_view()),
    path('user/<int:pk>/', UserDetail.as_view()),
    path('group/', GroupDetail.as_view()),
    path('groupList/', GroupList.as_view()),
    path('getMember/', GroupMember.as_view()),
    path('addMember/', AddMember.as_view()),
    path('createsuper/',CreateSuper.as_view()),
    path('deleteMember/<int:pk>/', DeleteMember.as_view()),
    path('updateMember/', UpdateMember.as_view()),
    path('getAnItem/<int:pk>/', NewsDetail.as_view()),
    path('getNewsSummaryList/', NewsList.as_view()),
    path('releaseNews/', CreateNews.as_view()),
    path('gettoken/', get_csrftoken)
]
